3.666 \(\int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x))^4 \, dx\)

Optimal. Leaf size=59 \[ \frac {a c^4 (B+i A) (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f} \]

[Out]

1/4*a*(I*A+B)*c^4*(1-I*tan(f*x+e))^4/f-1/5*a*B*c^4*(1-I*tan(f*x+e))^5/f

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {3588, 43} \[ \frac {a c^4 (B+i A) (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a*(I*A + B)*c^4*(1 - I*Tan[e + f*x])^4)/(4*f) - (a*B*c^4*(1 - I*Tan[e + f*x])^5)/(5*f)

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int (a+i a \tan (e+f x)) (A+B \tan (e+f x)) (c-i c \tan (e+f x))^4 \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (A+B x) (c-i c x)^3 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left ((A-i B) (c-i c x)^3+\frac {i B (c-i c x)^4}{c}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {a (i A+B) c^4 (1-i \tan (e+f x))^4}{4 f}-\frac {a B c^4 (1-i \tan (e+f x))^5}{5 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 3.55, size = 226, normalized size = 3.83 \[ \frac {a c^4 \sec (e) \sec ^5(e+f x) (5 (3 B-5 i A) \cos (2 e+f x)+5 (3 B-5 i A) \cos (f x)-25 A \sin (2 e+f x)+15 A \sin (2 e+3 f x)-10 A \sin (4 e+3 f x)+5 A \sin (4 e+5 f x)-10 i A \cos (2 e+3 f x)-10 i A \cos (4 e+3 f x)+25 A \sin (f x)-15 i B \sin (2 e+f x)+5 i B \sin (2 e+3 f x)-10 i B \sin (4 e+3 f x)+3 i B \sin (4 e+5 f x)+10 B \cos (2 e+3 f x)+10 B \cos (4 e+3 f x)+15 i B \sin (f x))}{40 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x])^4,x]

[Out]

(a*c^4*Sec[e]*Sec[e + f*x]^5*(5*((-5*I)*A + 3*B)*Cos[f*x] + 5*((-5*I)*A + 3*B)*Cos[2*e + f*x] - (10*I)*A*Cos[2
*e + 3*f*x] + 10*B*Cos[2*e + 3*f*x] - (10*I)*A*Cos[4*e + 3*f*x] + 10*B*Cos[4*e + 3*f*x] + 25*A*Sin[f*x] + (15*
I)*B*Sin[f*x] - 25*A*Sin[2*e + f*x] - (15*I)*B*Sin[2*e + f*x] + 15*A*Sin[2*e + 3*f*x] + (5*I)*B*Sin[2*e + 3*f*
x] - 10*A*Sin[4*e + 3*f*x] - (10*I)*B*Sin[4*e + 3*f*x] + 5*A*Sin[4*e + 5*f*x] + (3*I)*B*Sin[4*e + 5*f*x]))/(40
*f)

________________________________________________________________________________________

fricas [B]  time = 1.16, size = 99, normalized size = 1.68 \[ \frac {{\left (20 i \, A + 20 \, B\right )} a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (20 i \, A - 12 \, B\right )} a c^{4}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^4,x, algorithm="fricas")

[Out]

1/5*((20*I*A + 20*B)*a*c^4*e^(2*I*f*x + 2*I*e) + (20*I*A - 12*B)*a*c^4)/(f*e^(10*I*f*x + 10*I*e) + 5*f*e^(8*I*
f*x + 8*I*e) + 10*f*e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

giac [B]  time = 2.26, size = 119, normalized size = 2.02 \[ \frac {20 i \, A a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 20 \, B a c^{4} e^{\left (2 i \, f x + 2 i \, e\right )} + 20 i \, A a c^{4} - 12 \, B a c^{4}}{5 \, {\left (f e^{\left (10 i \, f x + 10 i \, e\right )} + 5 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 10 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 10 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 5 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^4,x, algorithm="giac")

[Out]

1/5*(20*I*A*a*c^4*e^(2*I*f*x + 2*I*e) + 20*B*a*c^4*e^(2*I*f*x + 2*I*e) + 20*I*A*a*c^4 - 12*B*a*c^4)/(f*e^(10*I
*f*x + 10*I*e) + 5*f*e^(8*I*f*x + 8*I*e) + 10*f*e^(6*I*f*x + 6*I*e) + 10*f*e^(4*I*f*x + 4*I*e) + 5*f*e^(2*I*f*
x + 2*I*e) + f)

________________________________________________________________________________________

maple [A]  time = 0.02, size = 99, normalized size = 1.68 \[ \frac {a \,c^{4} \left (\frac {i B \left (\tan ^{5}\left (f x +e \right )\right )}{5}+\frac {i A \left (\tan ^{4}\left (f x +e \right )\right )}{4}-i B \left (\tan ^{3}\left (f x +e \right )\right )-\frac {3 B \left (\tan ^{4}\left (f x +e \right )\right )}{4}-\frac {3 i A \left (\tan ^{2}\left (f x +e \right )\right )}{2}-A \left (\tan ^{3}\left (f x +e \right )\right )+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^4,x)

[Out]

1/f*a*c^4*(1/5*I*B*tan(f*x+e)^5+1/4*I*A*tan(f*x+e)^4-I*B*tan(f*x+e)^3-3/4*B*tan(f*x+e)^4-3/2*I*A*tan(f*x+e)^2-
A*tan(f*x+e)^3+1/2*B*tan(f*x+e)^2+A*tan(f*x+e))

________________________________________________________________________________________

maxima [A]  time = 1.22, size = 93, normalized size = 1.58 \[ \frac {12 i \, B a c^{4} \tan \left (f x + e\right )^{5} + {\left (15 i \, A - 45 \, B\right )} a c^{4} \tan \left (f x + e\right )^{4} - 60 \, {\left (A + i \, B\right )} a c^{4} \tan \left (f x + e\right )^{3} + {\left (-90 i \, A + 30 \, B\right )} a c^{4} \tan \left (f x + e\right )^{2} + 60 \, A a c^{4} \tan \left (f x + e\right )}{60 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^4,x, algorithm="maxima")

[Out]

1/60*(12*I*B*a*c^4*tan(f*x + e)^5 + (15*I*A - 45*B)*a*c^4*tan(f*x + e)^4 - 60*(A + I*B)*a*c^4*tan(f*x + e)^3 +
 (-90*I*A + 30*B)*a*c^4*tan(f*x + e)^2 + 60*A*a*c^4*tan(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 8.50, size = 100, normalized size = 1.69 \[ \frac {\frac {1{}\mathrm {i}\,B\,a\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^5}{5}+\frac {1{}\mathrm {i}\,a\,\left (A+B\,3{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4}+1{}\mathrm {i}\,a\,\left (-B+A\,1{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^3-\frac {1{}\mathrm {i}\,a\,\left (3\,A+B\,1{}\mathrm {i}\right )\,c^4\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2}+A\,a\,c^4\,\mathrm {tan}\left (e+f\,x\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)*(c - c*tan(e + f*x)*1i)^4,x)

[Out]

(A*a*c^4*tan(e + f*x) + (a*c^4*tan(e + f*x)^4*(A + B*3i)*1i)/4 + (B*a*c^4*tan(e + f*x)^5*1i)/5 + a*c^4*tan(e +
 f*x)^3*(A*1i - B)*1i - (a*c^4*tan(e + f*x)^2*(3*A + B*1i)*1i)/2)/f

________________________________________________________________________________________

sympy [B]  time = 0.68, size = 158, normalized size = 2.68 \[ \frac {- 20 i A a c^{4} + 12 B a c^{4} + \left (- 20 i A a c^{4} e^{2 i e} - 20 B a c^{4} e^{2 i e}\right ) e^{2 i f x}}{- 5 f e^{10 i e} e^{10 i f x} - 25 f e^{8 i e} e^{8 i f x} - 50 f e^{6 i e} e^{6 i f x} - 50 f e^{4 i e} e^{4 i f x} - 25 f e^{2 i e} e^{2 i f x} - 5 f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**4,x)

[Out]

(-20*I*A*a*c**4 + 12*B*a*c**4 + (-20*I*A*a*c**4*exp(2*I*e) - 20*B*a*c**4*exp(2*I*e))*exp(2*I*f*x))/(-5*f*exp(1
0*I*e)*exp(10*I*f*x) - 25*f*exp(8*I*e)*exp(8*I*f*x) - 50*f*exp(6*I*e)*exp(6*I*f*x) - 50*f*exp(4*I*e)*exp(4*I*f
*x) - 25*f*exp(2*I*e)*exp(2*I*f*x) - 5*f)

________________________________________________________________________________________